<?php

namespace LowCode\Traits\Events;

trait HasOnConfirm
{
    /**
     * 用户 confirm 时执行的回调
     * @param string $event 函数
     * @param string|null $id
     * @param array $modifiers
     * @return $this
     */
    public function onConfirm(string $event = "", string $id = null, array $modifiers = []): static
    {
        return $this->event("confirm", jsFn($event, $id), $modifiers);
    }
}
